home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970929-19971216 / 000210_news@newsmaster….columbia.edu _Fri Oct 31 02:11:01 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  4KB

  1. Return-Path: <news@newsmaster.cc.columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id CAA21976
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 31 Oct 1997 02:11:00 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id CAA28988
  7.     for kermit.misc@watsun; Fri, 31 Oct 1997 02:10:59 -0500 (EST)
  8. Path: news.columbia.edu!sol.ctr.columbia.edu!spool.mu.edu!uwm.edu!vixen.cso.uiuc.edu!howland.erols.net!newsfeed.internetmci.com!207.206.0.75!streamer1.cleveland.iagnet.net!iagnet.net!news-w.ans.net!newsfeeds.ans.net!tmpsu003.tmpprv.allied.com!asbe05.phx1.aro.allied.com!tmpsp002.tmpprv.allied.com!snowhite.mto.allied.com!usenet
  9. From: "John M. Ritter" <jmr@alliedsignal.com>
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Need help with Kermit script
  12. Date: Thu, 30 Oct 1997 10:25:33 -0500
  13. Organization: AlliedSignal Inc.
  14. Lines: 58
  15. Message-ID: <3458A6ED.F555C0D0@alliedsignal.com>
  16. Reply-To: jmr@snowhite.mto.allied.com
  17. NNTP-Posting-Host: jmr.mto.allied.com
  18. Mime-Version: 1.0
  19. Content-Type: text/plain; charset=us-ascii
  20. Content-Transfer-Encoding: 7bit
  21. X-Mailer: Mozilla 4.03 [en] (WinNT; U)
  22. Xref: news.columbia.edu comp.protocols.kermit.misc:7993
  23.  
  24. I am trying, for the first time, to write a script that logs onto a
  25. service and captures data to a file using C-Kermit 6.0.192, 6 Sep 96,
  26. for UnixWare 2. There are a few things that are confusing me, and I'd
  27. appreciate some pointers.
  28.  
  29. 1. Since this will run on different systems in different directories,
  30.    via cron, a shell script kicks off the session with:
  31.         kermit -E -H -l /dev/term/a08m -b 38400 -m usrobotics -y ./.kermitrc
  32.  
  33.    The problem is, if the first command is DIAL phone-number, kermit
  34.    complains: Sorry, you must SET MODEM first
  35.    Huh? if I SHOW MODEM, everything is OK. Why can't I jump right in
  36.    to a dial command? Of course, if I manually SET MODEM, then it
  37.    complains Sorry, you must SET LINE first (and ditto for SPEED).
  38.  
  39.  
  40. 2. This service is accessed via SprintNet. After connecting to the
  41.    service, I get trampled with escape codes to clear the screen, change
  42.    text colors and dozens of backspaces. The login prompt looks like:
  43.    999999 CONNECTED^M
  44.        ^[[2J^H^H^H^H  ^[[6n^[[5n^[[0c^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^H^
  45. H^H^H^H^H^H^H^H^H                              ^[[12h^H^H^H^H^H^H^H^H^H^H^H^H
  46.                     ^[[32m^H^H^H^H^H^H^H^H        ^M
  47.    ^M
  48.    311061100020 14400:8T 128x2,PTRA W002-R5020200#0012 CONNECTED^M
  49.         ^[[31m^H^H^H^H^H     ^M
  50.    WE AUTHORIZE USE OF THIS SERVICE ONLY THROUGH EXPRESS WRITTEN PERMISSION.^M
  51.    UNAUTHORIZED ACCESS OR USE IS A VIOLATION OF LAW.     ^[[37m^H^H^H^H^H     ^M
  52.    ENTER COMPANY ID?^MENTER COMPANY ID? (company id gets entered here)
  53.    ENTER USER ID?BBBBBBBBBBBBBBBBB^MENTER USER ID?XXXXXXXXXXXXXXXXX^MENTER USER
  54. ID?^MENTER USER ID? (user id gets entered here)
  55.  
  56.    Using the examples from the book (See? I bought the book!! Both
  57.    editions too!) and a plain INPUT, I never seem to find the prompt.
  58.    What seems to work fairly well is clearing the buffer and performing
  59.    a \Frindex on \v(input), but the escape codes *still* end up getting
  60.    back to either the kermit command prompt or a UNIX prompt.
  61.  
  62.    There must be a simpler way to scan for this pattern!
  63.  
  64.  
  65. 3. The section "Downloading to C-Kermit" has an example of grabbing a
  66.    lasagna recipe, but only gives a hint on automating it. I tried to
  67.    get back to a kermit prompt from a script using OUTPUT \v(escape)C
  68.    (Why isn't this listed in the table of built-in variables??) and do
  69.    the log session, but when all is done, the session log file is zero
  70.    bytes.
  71.  
  72.    Does anybody have an example of this that actually works?
  73.  
  74.  
  75. Any help on these steps would be *greatly* appreciated!
  76. -------------------------------------------------------------------------------
  77. "I enjoy working with human beings, and                          John M. Ritter
  78.  have stimulating relationships with them."                   AlliedSignal Inc.
  79.                     - HAL 9000                 Manager, Application Development
  80.                                                     jmr@snowhite.mto.allied.com
  81. -------------------------------------------------------------------------------